using B.S.XZYData.ErrorCode;
using B.S.XZYData.Domain.LJC.Dto;
using MediatR;

namespace B.S.XZYData.Api.Read.Application.Command.WorkOrderReport
{
    /// <summary>
    /// 获取工单报工关联列表命令
    /// </summary>
    public class GetWorkOrderReportListCommand : IRequest<ApiPageing<WorkOrderReportViewDto>>
    {
        /// <summary>
        /// 页码（从1开始）
        /// </summary>
        public int Index { get; set; } = 1;

        /// <summary>
        /// 每页大小
        /// </summary>
        public int Size { get; set; } = 20;

        /// <summary>
        /// 工单编号（模糊搜索）
        /// </summary>
        public string? WorkOrderCode { get; set; }

        /// <summary>
        /// 产品编号（模糊搜索）
        /// </summary>
        public string? ProductCode { get; set; }

        /// <summary>
        /// 产品名称（模糊搜索）
        /// </summary>
        public string? ProductName { get; set; }

        /// <summary>
        /// 状态筛选
        /// </summary>
        public string? Status { get; set; }

        /// <summary>
        /// 创建人筛选
        /// </summary>
        public string? CreateBy { get; set; }

        /// <summary>
        /// 创建开始日期
        /// </summary>
        public DateTime? CreateStartDate { get; set; }

        /// <summary>
        /// 创建结束日期
        /// </summary>
        public DateTime? CreateEndDate { get; set; }

        /// <summary>
        /// 计划开始日期
        /// </summary>
        public DateTime? PlannedStartDate { get; set; }

        /// <summary>
        /// 计划结束日期
        /// </summary>
        public DateTime? PlannedEndDate { get; set; }

        /// <summary>
        /// 排序字段
        /// </summary>
        public string? SortField { get; set; } = "CreateTime";

        /// <summary>
        /// 排序方向（asc/desc）
        /// </summary>
        public string? SortOrder { get; set; } = "desc";
    }
}
